object RegistrationErrorDemo extends App {
  val studentName = "张三"
  val age = 17
  val score =75
  val hasparticipated = true
  if (age >18){
    if (score > 80){
      println(s"studentName可以参加高级组")
    }else{
     println(s"studentName可以参加中级组")
    }
  }else{
    if(hasparticipated){
      println(s"studentName 可以参加初级组" )
    }else{
      println(s"studentName 不能参加" )
    }
  }
  val result:String = if (score>90)"优秀"
  else
    "一般"
  println(s"成绩评定：$result")
}
